package com.atguigu.spzx.manner.controller;

import com.atguigu.spzx.manner.service.SysRoleUserService;
import com.atguigu.spzx.model.dto.AssginRoleDto;
import com.atguigu.spzx.model.myemun.ResultCodeEnum;
import com.atguigu.spzx.model.vo.common.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/system/sysUserRole")
public class SysUserRoleController {
    @Autowired
    private SysRoleUserService sysRoleUserService;
    @PostMapping("/doAssign")
    public Result doAssign(@RequestBody AssginRoleDto assginRoleDto) {
        sysRoleUserService.doAssign(assginRoleDto);
        return Result.build(ResultCodeEnum.SUCCESS);
    }
}
